<div id="sidebar">
   <div class="singlewidget">
    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Left Widget') ) : ?>
	 <h3>
	  小工具
	 </h3>
	 <div class="box">
	  自己定义小工具
	 </div>
    <?php endif; ?>
  </div> 
<?php if (get_theme_mod('side') == 'Yes') { ?>  
  <div class="singlewidget">
    <h3>
      后台定义第三方内容
    </h3>
    <div class="box">
		<?php echo stripslashes(get_theme_mod('side_content')); ?>
    </div>
  </div>
<?php } ?>

  <div class="singlewidget">
    <h3>
      文章日历
    </h3>
    <div class="box">
	  <div class="widget calendar">
			<?php get_calendar(); ?>
	  </div>
    </div>
  </div>	
  
  <div class="singlewidget">
    <h3>
      最近评论
    </h3>
    <div class="box">
      <div class="lastest_comments"><?php if (function_exists('dh_comment_recent')) dh_comment_recent(); ?></div>
    </div>
  </div>
  <div class="singlewidget">
    <h3>
      最多评论
    </h3>
    <div class="box">
      <?php comment_sort(); ?>
    </div>
  </div> 	
  <div class="singlewidget">
    <h3>
      最热文章
    </h3>
    <div class="box">
      <?php echo '<ul>', get_most_viewed_format('post',5,0,0,'<span class="title"><span class="smaller">►</span> ','</span>&nbsp;','','',' <span class="right_count">','</span>'), '</ul>';?>
    </div>
  </div>
  <div class="singlewidget">
    <h3>
      最多评论
    </h3>
    <div class="box">
      <?php if (function_exists('dh_posts_orderby_comments')) dh_posts_orderby_comments();?>
    </div>
  </div>
  <div class="doublewidget">
    <h3>
      相关统计
    </h3>
    <div class="box">
      <?php echo dh_site_stastics();?>
    </div>
  </div> 
</div>
<!--end: sidebar-->
